<div class="layuimini-container">
    <form id="app-form" class="layui-form layuimini-form">
        <div class="layui-tab">
            <ul class="layui-tab-title">
                <li class="layui-this">基础信息</li>
                <li>文章内容</li>
            </ul>

            <div class="layui-tab-content">

                <div class="layui-tab-item layui-show">
                    <div class="layui-form-item">
                        <label class="layui-form-label required">标题</label>
                        <div class="layui-input-block">
                            <input type="text" name="title" class="layui-input" lay-verify="required" placeholder="请输入标题" value="">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label required">文章类型</label>
                        <div class="layui-input-block">
                            <select class="layui-input" name="type" lay-verify="required">
                                {volist name="articleType" id="vo"}
                                <option value="{$vo.id}">{$vo.config_value}</option>
                                {/volist}
                            </select>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">排序</label>
                        <div class="layui-input-block">
                            <input type="number" name="order" min="0" class="layui-input" lay-verify="required"  placeholder="请输入排序" value="">
                        </div>
                    </div>
                    <label class="layui-form-label required">封面图片</label>
                    <div class="layui-input-block layuimini-upload">
                        <input name="cover_photo" class="layui-input layui-col-xs6" lay-verify="required" placeholder="请上传封面图片" >
                        <div class="layuimini-upload-btn">
                            <span><a class="layui-btn" data-upload="cover_photo" data-upload-number="one" data-upload-exts="png|jpg|ico|jpeg" data-upload-icon="image"><i class="fa fa-upload"></i> 上传</a></span>
                            <span><a class="layui-btn layui-btn-normal" id="select_cover_photo" data-upload-select="cover_photo" data-upload-number="one" data-upload-mimetype="image/*"><i class="fa fa-list"></i> 选择</a></span>
                        </div>
                    </div>
                </div>
                <div class="layui-tab-item">
                    <div class="layui-form-item">
                        <label class="layui-form-label required">文章内容</label>
                        <div class="layui-input-block">
                            <script type="text/plain" id="ueditor"></script>
                        </div>
                    </div>
                </div>
            </div>

            <div class="hr-line"></div>
            <div class="layui-form-item text-center">
                <button type="submit" class="layui-btn layui-btn-normal layui-btn-sm" lay-submit>确认</button>
                <button type="reset" class="layui-btn layui-btn-primary layui-btn-sm">重置</button>
            </div>
        </div>
    </form>
</div>
<script type="text/javascript" src="/static/plugs/jquery-3.4.1/jquery-3.4.1.min.js"></script>
<script type="text/javascript" src="/static/plugs/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="/static/plugs/ueditor/ueditor.all.js"></script>
<script type="text/javascript" src="/static/plugs/ueditor/lang/zh-cn/zh-cn.js"></script>
<script type="text/javascript">
    var searchType=JSON.parse('{$searchType|raw}')
</script>
<script>
    var ueditor;
    $(function (){
        setTimeout(function (){
            initEditor(450)
        },1000)
    })
    function initEditor(height) {
        ueditor = UE.getEditor('ueditor', {
            initialFrameWidth: "100%", initialFrameHeight: height, zIndex: 9999
            , toolbars: [[
                'source','undo', 'redo', '|', 'bold', 'italic', 'underline', 'fontborder', 'strikethrough'
                , 'superscript', 'subscript', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote'
                , 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist'
                , 'selectall', 'cleardoc', '|', 'rowspacingtop', 'rowspacingbottom', 'lineheight', '|'
                , 'customstyle', 'paragraph', 'fontfamily', 'fontsize', '|', 'directionalityltr'
                , 'directionalityrtl', 'indent', '|', 'justifyleft', 'justifycenter', 'justifyright'
                , 'justifyjustify', '|', 'touppercase', 'tolowercase', '|', 'link', 'unlink','anchor', '|', 'imagenone'
                , '|', 'simpleupload', 'insertimage', 'wordimage',
                , 'pagebreak', 'template', 'background', '|', 'horizontal', 'date', 'time', 'spechars'
                , '|', 'inserttable', 'deletetable', 'insertparagraphbeforetable'
                , 'insertrow', 'deleterow', 'insertcol', 'deletecol', 'mergecells', 'mergeright', 'mergedown'
                , 'splittocells', 'splittorows', 'splittocols', 'charts', '|', 'print', 'preview', 'searchreplace'
                , 'drafts'
            ]]
        });
    }
</script>